package com.adups.monitor.controller;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.adups.monitor.entity.ExceptionProduct;
import com.adups.monitor.utils.PageUtils;
import com.adups.monitor.utils.R;

import org.springframework.stereotype.Controller;



@Controller
@RequestMapping("product")
public class ProductController {

	@Autowired
	private ArrayList<ExceptionProduct> exceptionProductList;
	
	@RequestMapping("/exception.html")
	public String list(){
		return "product/exception.html";
	}
	
	
//	/**
//	 * 列表
//	 */
//	@ResponseBody
//	@RequestMapping("/list")
//	@RequiresPermissions("product:list")
//	public R list(Integer page, Integer limit){
//		Map<String, Object> map = new HashMap<>();
//		map.put("offset", (page - 1) * limit);
//		map.put("limit", limit);
//		
//		//查询列表数据
////		List<ProductEntity> productList = productService.queryList(map);
////		int total = productService.queryTotal(map);
//		
//		PageUtils pageUtil = new PageUtils(exceptionProductList, exceptionProductList.size(), limit, page);
//		
//		return R.ok().put("page", pageUtil);
//	}
	
	
//	/**
//	 * 信息
//	 */
//	@ResponseBody
//	@RequestMapping("/info/{id}")
//	@RequiresPermissions("product:info")
//	public R info(@PathVariable("id") Long id){
//		ProductEntity product = productService.queryObject(id);
//		
//		return R.ok().put("product", product);
//	}
	
}
